generic multi key handling