refactored transactions.rb for line length