tree rendering has been completely rewritten