Two possible ways to handle transactions