improve graph representation