Added environment argument