add another version of check substree