Implemented rightRotate