completed cachematrix.R contents