solution to cachematrix.R