added environment switch for irpg db