update exmaple.cpp and Makefile