Updated cacematrix with solution