modify word distance