abstract transactions code out