modified functions.cpp