move transaction code to Transactor