Rotation: initial version which respects boundaries