Some rough attempts with mining.py. Has not been tested