We consider the following problem: Given two finite families of modules each of these modules has exactly 2 maximal right ideals in its endomorphism ring. When are direct sums of these families isomorphic? The result can be understood as a generalization of well-known Krull-Schmidt theorem which solves the problem for families of modules with local endomorphism rings.