updated automatic diagram