sorting of edges for fpoint id