data matrix class
more DM class improvements