added methods to the controller