allow the API to be used synchronously