added curl and connection to api