added environment assertion