rewrite appendRotation method with oo style