add twe graph problem