starting kd tree analysis