extract directives