first commit of updates to cache matrix.R