my $title = 'Billing events';
if ( $statuses[0] eq 'failed' and !defined($statuses[1]) ) {
# tweak the title if we're showing only failed events
my $title = 'Billing events';
if ( $statuses[0] eq 'failed' and !defined($statuses[1]) ) {
# tweak the title if we're showing only failed events