event life cycle demo