update Sample.cpp