added directives and more features