change the compareTo() method in MemEdge, and also put a flag to control if instning nodes first
rslv conflicts