Updated example.cpp