made the directive more flexible and added documentation via a comment header