added ifdef around irloop type