Finalized the Mining Programm