initial implementation of switch -> if conversion