Modificate directsum of matrix