copied IRUtils, added testcase