Using knnsearch object. Not as fast as i want.