First work on kd-tree traverse