added key gen