added tree plotting