Second versions implementing eventbarrier