Change the ajax functionality