Change the octree traversal code, making it efficient.