implements more functions and starts main.cpp