Complete cachematrix.R file