initial connection to api