Added envcap functionality