added env variable functionality