example written in main.cpp