updates to add functionality for services and directives