completed main() , not debug
fix bug in Method insertEdge()