rewriting the directive, adding docs