Update environment.cpp