generate diagrams