first function add.edge