Added rotation code