Reduce Switch size with polymorphism