add diagram, other tweaks