modify cachematrix to cache the matrix obviously