created the cache matrix functions