encapsulated sampling techniques into sampler