updates to neighbordb matching logic