updates to add more functionality for directives