added constructor for env