remove unnecessary graph