graph sorted