(*) GetSortedEndPoints: added a comparer paremeter