how the grinding machine work