completed composition functor
start definition of treeint