update rot.py w/ some best practices