Changed sample.cc