api key now conditional