replace == -1 with == _tree.TREE_LEAF