Update cachematrix functions