uncommented version of cachematrix.R