takes api key as a variable now from /userInput