added support for ternary expressions