final cachematrix.R file to be submitted