rotation test and implementation