throws error in determinant is zero
added util.algorithm