My version of cachematrix with additional comments