remove unnecessary code regarding graph