Work with diagrams