3 stages of refining metallic minerals