Updated miner

Thanks to Sarath