branching to matrix2d