DFS, BFS modified to work with structure change

after conn changed to array of edge objects weight containing weight and
not simply just the destination vertex id