finalize tree model for tables