refine tree project matrix