first attempt at cacheMatrix