randomize, and allow user to specify max