updated events and table relations