event fix
extract directives to another file