directives, refactored