added tests for right rotations, refactored rotations again