small refactoring and figured out how to display statement in tree