cachematrix.R modified and commented