getting switch reg working (not yet)