reordered ajax calls