generic sampling methods