refactor IR + SYSTEM