check key generation