To figure out how to use knnsearch()