self implemented rotation