flow chart of the mining process