implemented gauss-jordan algorithm, testing for it