update edges