add preamble to main.cpp