moved updating controller logic out of the view and into the controller