rework LU decomposition