boilerplate for random generator