simple refactoring to transactions_controller