filled in cachematrix.R functions