finish linkgraph,but still doesn't work well
restore deleted main.cpp wrongly
now linkgraph can work well