changing to use counters instead of print.  fix lat lon bug