kd tree in progress