ex5.cpp now does stuff using functions