diagram about mining step by step