adding key generation flow