formatted the events