update demo.cpp