fixed isFunc and isInjFunc => diagonalization done