new deferred method to wait for API's before loading.