rewrite query in `payout()` to better filter participants
fix test