added function code to cachematrix.R