testing octree
some refactoring for testing