Demongolized rotation code