refactor EventInstance class