added env variables and different settings based on env