updated to use new ddata and dlog