converted to matrix form

still not completely generalized.