using diagrams where appropriate