updated event page code