refactor for new payload, event format