updated C.cpp