formatting
fixed bug with printing dist[v]