added draft code of graph