Changed the ajax func.