grinding machine and its function