helper method in controller