moved big switch out of main