added extension enviroment checks