rotation of a array