replaced list of keys in switches with keygroup of keystates.  no logic yet