adding diagrams and links