update cachematrix.R for submission