added kd tree class and some tests