breaking up controller, view and driver code