added matrix and jacobi theory part