Added jacobi rotation method