deal with translating case expression to scott program