implemented rotation function