added a constructor to event barrier