add near neighbor algorithm