refactor Event model