modify sample.cc