formatted the events data