add function to create edge by click source & target nodes