added matrixinput