modularize directives