codes added to cachematrix.R YDT Nov-23-2014