Added the rotation and translation code