directives using functions Dom manipulation