refactor Edge successor/predecessor search