added ANN search for kd-tree