first edit of cachematrix.R