Modified cachematrix.R file