edit cachematrix with the functions required