Using KDTree and reading from console