refactoring api call methods; nested routes