handled more nodes and improved output assembler