Added matrixify and test