created matrix form