flow diagram in mining