improved event factory registration