new function for making edge lists