Smartified the rotation code