unfinished ostree, a lttle modification in algorithms.h and tree.c