move controller to separate file