pivoting problem fixed in lu-factorization