cachematrix and cachesolve implented