                 stateCode   : location.stateCode
                 state       : location.state
 
-              state.save (err) -> states.next err
+              state.save nextState
 
-          states.push -> countries.next()
+          async.seris states, -> next()
 
-          daisy states
-
-      countries.push -> callback null
-
-      daisy countries
+      async.series countries, -> callback null
 
   @importAll = secure (client, callback) ->
 

    collection.distinct 'countryCode', {}, (err, countryCodes) =>
      return callback err  if err

      countries = countryCodes.map (countryCode) => =>

        collection.distinct 'stateCode', { countryCode }, (err, stateCodes) =>
          return callback err  if err

          states = stateCodes.filter(Boolean).map (stateCode) => =>

            @one { stateCode, countryCode }, (err, location) ->


async       = require 'async'
KodingError = require '../../error'
{ Model, secure, signature } = require 'bongo'

module.exports = class JLocation extends Model

