added env logic
added env logic
changed Proc