new mining code