replacing more global variable foo.