Added environment handler