refactor event creation process