functions added to cachematrix.R