updated dwriter functions and utils