remade code for completegraph display