working matrix analysis with loop algorithm