Updating word chain to a function version