functions added to the cachematrix file