complete cachematrix.R functions