refactorized enviroments definitions