refactor eventmixin