add a callback to the dgs() method