refactor listing.rb