Refactor mine setting method