tx history refactoring