modified control.py