modified download api to use requests and added comments