updated documentation and diagrams