refactoring createEnvData
oops