added scanTreeWithOcclusion() for testing