Made changes to the cachematrix .