[PD] changing the position of arrays dynamically