made switcher more extensible