add functions to cachematrix