talking to the api