davids similarity measure changes to match.py