the cache matrix functions