Refactor geocode fn 1