modify commoncodes.cpp