removed all console.logs, and added error messages for failed requests.