better API loading sequence