added a controller, must move the logic there
the controller object