refactor
factored transactionadapter into class