updated latex and diagrams