used updated version of geocode function