copied cachemean.R, implemented cachematrix.R