added reg&env changes