         getTopoJsonLayer("data/tz_wards.topojson", "tz_wards", false)
       ]).then((data) ->
 
-        regionLayer = data[0]
-        wardLayer   = data[1]
+        [regions, regionLayer] = data[0]
+        [wards, wardLayer]     = data[1]
 
         ################
         ### MAKE MAP ###

          center: mapCenter
          zoom: 5
          fullscreenControl: true
          layers: [satLayer, regionLayer, wardLayer, clusterLayer]
        )
        makeLegend(map)


          return unless val

          # only 26 regions so a simple linear search is ok
          for f in regions
            r = f.properties.REGNAME.toLowerCase()

            if r == val.toLowerCase()
              # I don't really understand why this works, but it does...
              # FIXME if you can!
              if f.geometry.coordinates.length is 3
                numToUnpack = 2
                coordsToUse = f.geometry.coordinates
              else
                numToUnpack = 2
                coordsToUse = [f.geometry.coordinates]
              points = L.GeoJSON.coordsToLatLngs(coordsToUse, numToUnpack)
              # instantiate as multipolygon to get the bounds
              bounds = L.multiPolygon(points).getBounds()
              map.fitBounds(bounds)
              return
        )
        return map
      )

    modalSpinner.open()
