Improve the request function