         super.init()
         locationManager.delegate = self
         locationManager.desiredAccuracy = kCLLocationAccuracyBest
+        
+        println("total monitored regions:\(locationManager.monitoredRegions.count)")
+        // added
+        //if(store.getTotalGeoNotifications() >= 20) {
+            locationManager.startMonitoringSignificantLocationChanges()
+        //}
+       
         if (!CLLocationManager.locationServicesEnabled()) {
             log("Location services is not enabled")
         } else {


    func getAll() -> [JSON]? {
        let (resultSet, err) = SD.executeQuery("SELECT * FROM GeoNotifications")

        if err != nil {
            //there was an error during the query, handle it here
            log("Error while fetching from GeoNotifications table: \(err)")

        notification.alertBody = geo["notification"]["text"].asString!
        UIApplication.sharedApplication().scheduleLocalNotification(notification)
    }

    // added custom
    
    func post(params : Dictionary<String, String>, url : String) {
