Worked on controller.cpp