implement AdjancyListUngraph