should refactor the dmr writer to another class so it can be used in any driver