updated env method