simplify output expressions