Added functions to cachematrix