minor changes to rotation functions