added method setApiKey()