Update controller.cpp