implement graph output