added random seed option