Title: Details of the implementation of non-linear cost functions in tree-building algorithms