codes comparison of trees (not finished)