coding #1 adding methods to the controller