fix rotations function

was incorrectly mapping the input array