create env refactory