some hacks to support ternary operators and some additional else cases