cachematrix.R complete and working