Update the functions.cpp and server/client