Added rotation function, issue #22