Make dataormatrix depend on type