implements function calling directives