new data structure for egdes