choose optimal edges