try to factor out env setup