refine tree to support graphing