refactor to use a universal request to make API calls simpler