code cleanup, worked on the rotation function