utils for rotate position of array items