 
       self.postToResource resource, data, (returnData) ->
         id = returnData['school_id']
-        self.loadSchools()
-        for school in self.schools
-          if school.id == $id
-            self.school = school
-        self.editSchool = false
+        
+        self.loadSchools () ->
+          for school in self.schools
+            if school.id == id
+              self.school = school
+          self.editSchool = false
         
 
     self.form_params = () ->

      params = { state: self.state }
      self.loadRemoteCollection('districts',params)

    self.loadSchools = () ->
      if self.isDomestic()
        self.loadDomesticSChools()
      else
        self.loadIntlSchools()

    self.loadDomesticSChools = () ->
      params = { district_id : self.district.id }
      self.loadRemoteCollection('schools',params)

    self.loadIntlSchools = () ->
      params = { country_id : self.country.id }
      self.loadRemoteCollection('schools',params)

    self.countrySelected = () ->
      if self.isDomestic()

        self.loadDomesticSChools()
      delete self.school

    self.loadRemoteCollection = (collectionName, params={}, success_fn=null) ->
      url = API_V1[collectionName.toUpperCase()]
      $http({method: 'GET', url: url, params: params})
      .success (data, status, headers, config) ->
        $log.log("loaded #{collectionName} collection from #{url}")
        self[collectionName] = data
        if success_fn
          success_fn()
      .error (data, status) ->
        $log.log "Error loading #{collectionName} collection"
        self[collectionName] || =[]
