updated env functions