removed trapSwitches