lu decomposition works fine