Modify example to show executing within a transaction