moves API request to controllers