improved sampling procudure