use a class for transactions, improve organization