modified foo.cpp