I think i found the right algorithm for the octree insertion
Insertion finished