update homework3.cc