made the switch a little bit more efficient