find the bug in dg