controller calls rest api and refactored better names