Added support for environment