updated text parsing, Binary tree