refactoring api request creation