creating db connection, completing all api calls