working LU decomposition