match.py now updates cases