use var to describe edge instead of const.