some changes in sampling