Update commonFunctions.cpp