add KD Tree implementation