updated cachematrix with solution