Update controller.py

Added a doc string.