add graph story function