added functionality of saving event