moved some rotary specific code into rotary.py