adding env check