move controller to its own file