using kd tree 2.5x speedup
before spatial collection used