fallback if geocoding api times out; refactors js