adding method to controller