function.cpp done, built but not tested