committing edited cachematrix.R