added sample_out.cpp