Added Mining Logic