rename file to ajaxCalls.js and move all ajax code into it