adds API call in controller