replaced random message id sampling