final cachematrix.R