refactoring Transaction