Added pause functionality to thread class