Create event_participation function