refactor octree