change parameter type to matrix