update cachematrix.R with 2 functions