Revert "Revert "implement switch statements""

This reverts commit 8c61748037e4791f1764a8b5932aa48315d41a04.