refactor so that Accounts encapsulates Transactions