what is function of grinding machine