added attribute distance
bfs method update
Now the method sets the distances of the vertexes from the start of the
traversal.
updated test