Tree parser

removed the inner loop.