added generateKeyPair