Add comment to search code (it's not clear enough on its own)