Refactor geocode fn 2