Completed cachematrix.R functions