main.js: extract make_pick_..._group_problems()