- $_->{range} ? sprintf(' (%s)', join ', ',
- "range $_->{range}",
-# "cost $_->{cost}",
+ $_->{range} || $_->{cost} ? sprintf(' (%s)', join ', ',
+ $_->{range} ? "range $_->{range}" : (),
+ $_->{cost} ? sprintf('cost %.0f%%',
+ 100 * $_->{cost} / $row->{energy}
+ ) : (),