Added rotation functionality.