DRY up balance.rb with extract()