Added the printenvironment code
did some stuff