dmatx refactored. passed.