removed use of switch/case