changed k nearest upper bound to be 10,000 because 100 is apparently not enough