restartable skippable fun WithDensitySample()