Copyed .rotate defenition into reset to fix undefined .rotate