Modify cachematrix.R for assignment 2