modified to use dgrammcon