grinder machine working principle