Added control over random seed