I've added the API key setting function