Updating main.cpp samples