cachematrix.R complete