Updated logic so that cacheSolve uses function in makeCacheMatrix