use std algorithm to generate random data