how work mining machines for waste