edited fitTreeConcatenate