rotate function for RubeJect