update diagram