completely working lu decomposition