refactored Transaction