updating diagrams and code with spec