working Lu decomposition