functions of a ball mill