 
       @remove callback
 
-  REGISTER_CAMPAIGN = "register"
 
-  isCampaignValid = (campaignName, callback)->
-    [campaignName, callback] = [REGISTER_CAMPAIGN, campaignName] unless callback
+  DEFAULT_CAMPAIGN = "register"
+
+
+  @fetchCampaign = fetchCampaign = (campaignName, callback)->
+
+    unless callback
+      [campaignName, callback] = [DEFAULT_CAMPAIGN, campaignName]
+
+    JReferralCampaign.one name: campaignName, (err, campaign) ->
+      return callback err  if err
+      callback null, campaign
+
+
+  @isCampaignValid = isCampaignValid = (campaignName, callback)->
+
+    unless callback
+      [campaignName, callback] = [DEFAULT_CAMPAIGN, campaignName]
+
     fetchCampaign campaignName, (err, campaign)->
+
       return callback err  if err
       return callback null, isValid: no  unless campaign
 

        endDate, startDate } = campaign

      if Date.now() < startDate.getTime()
        console.info "campaign is not started yet"
        return callback null, isValid: no

      # if date is valid
      if Date.now() > endDate.getTime()
        console.info "date is not valid for campaign"
        return callback null, isValid: no

      # if campaign initial amount is 0


      return callback null, { isValid: yes, campaign }


  increaseGivenAmountSpace:(size, callback)->

    unless callback
      [size, callback] = [@campaignPerEventAmount, size]

    size = size * 4

    @update $inc: campaignGivenAmount: size , callback
