add the ajax code for referenec