update to cachematrix.R