integrated the ajax script into the script js file