editing a pair of functions in cachematrix.R