my $r = rand(1); if($r < 0.5 and not exists $seen{$lncount}) {