improve graph parser