change the ajax call order