finish Graph class