```\nfunction mod(\n    uint256 a,\n    uint256 b,\n    string memory errorMessage\n) internal pure returns (uint256) {\n    unchecked {\n        require(b > 0, errorMessage);\n        return a % b;\n    }\n}\n```\n