comments added to controller.py