refactored to use browserified irf