Update cachematrix.R with solution