allow to choose sampling method