now with sample selection