Completed cachematrix.R