fix relations
create event trigger