small refactor in events model