successfully connects to api