update environment and controller