mining working and principle of ball mills