adding key generation