prepare_next_iteration function

Prepares the next iteration of the iterative sampling algorithm