update cachematrix with my code and comments