minor modifications based on new sampling methods