adds flow diagram