added rotate behaviour for array