seting up the api