polymorphic rotateLeft and rotateRight