more changes to cachematrix.R