added basic support for directive