     vs = mk_vertices(nv)
     bs = mk_bonds(table, nv)
     writejson(dest, vs, bs)
+    IO.puts("Vertices: " <> Integer.to_string(nv) <> ", Bonds: " <> Integer.to_string(length(bs)));
   end
 
   def writejson(path, vertices, bonds) do

  def row_to_bonds([], _, _, _), do: []
  def row_to_bonds([x | xs], pairs, n, i) do
    if x < @min_dist do x = @min_dist end
    cond do 
      Enum.member?(pairs, {n, i}) ->
        [%{fst: n, snd: i, len: x} | row_to_bonds(xs, pairs, n, i + 1)] 
      true ->

            Enum.filter(row, fn(%{fst: _, len: x, snd: _}) -> 
              x < @distance_delimiter 
            end) 
          end)
  end

  def distancematrix_to_bonds([], _, _), do: []
