using clear function of supper class rather than init again
v1 distance calculation using BFS