more fixes. add sampling