refactored directives