implementing an Environment objects instead of just using a dict