added DG.cpp