prototyped functions in main.cpp