added support for directive with attributes