testing random samples