modified GaussianElimination