updated documentation and improved syntax