added random matrixw