refactoring of directivies