Added random sequence generation