Added some additional features into the directive