added a stable but flawed version of rotation