add transactions and correct errors