fixed up mining section