made switch statement smarter