Update mining.py