main.cpp: added main function body