wrap mining in function
add entropy.py