new version of pick_wi using intsets, and further type refinements