some progress made on the environment chain... this one uses static assignment
still not quite right...
input2.p -- the input used to test the environment chain
currently printing out the environments at the end