seperate controller and view