added functionality to enviroment package along with test