Updated Version of cachematrix.R file