added random event generation
added more example