revamped adding a transaction