added environment switch