Added random event generation