used threading on mining process