test to matrix