adds switch/case

needs testing