add diagrams and captions to docs