modifying API to use API KEY