[core] kd tree has been implemented (issue #86)