written code for cachematrix.R