MS - Modified cachematrix.R