simplify key handling