First implementation of rotation