added edge sampling method