new cpp
add some private function and public setCycleGraph