Added random seed support