directives refactored