pseudocode for main.cpp