updated events factory