update controller.py

implemented select