started rewriting event system