added GenerateKey