merged two controllers into controller.py