Adding survival graph code