Refactor geocode fn 3