ordering api calls