updating random samples