modified the environment class