implementing access mode in an environment
refactoring around Environment::AssignValue