added jacobi function for mat diagonalization. no more bumpy dependance!!