is the transaction required or could it be simplified to only select?