flow diagram of mining process