     isUsingTier: (tier)->
       @selectedTier == tier
     rubricGradeParams: ()->
-      metric = this
-      tier = @selectedTier
       {
-        metric_name: metric.name,
-        metric_description: metric.description,
-        max_points: metric.max_points,
-        order: metric.order,
-        tier_name: tier.name,
-        tier_description: tier.description,
-        points: tier.points,
+        metric_name: @name,
+        metric_description: @description,
+        max_points: @max_points,
+        order: @order,
+        tier_name: @selectedTier.name,
+        tier_description: @selectedTier.description,
+        points: @selectedTier.points,
         submission_id: submission_id,
-        metric_id: metric.id,
-        tier_id: tier.id,
-        comments: metric.comments
+        metric_id: @id,
+        tier_id: @selectedTier.id,
+        comments: @comments
       }
     selectBadge: ()->
-      self = this
-      newBadge = new MetricBadgePrototype(self, angular.copy(self.selectedBadge))
-      self.badges[newBadge.badge.id] = newBadge # add metric badge to metric
-      delete self.availableBadges[self.selectedBadge.id] # remove badge from available badges on metric
-      self.selectedBadge = "" # reset selected badge
+      newBadge = new MetricBadgePrototype(@, angular.copy(@selectedBadge))
+      @badges[newBadge.badge.id] = newBadge # add metric badge to metric
+      delete @availableBadges[@selectedBadge.id] # remove badge from available badges on metric
+      @selectedBadge = "" # reset selected badge
 
-    deleteMetricBadge: (badge)->
-      self = this
-      metricBadge = badge 
-
+    deleteMetricBadge: (metricBadge)->
       if confirm("Are you sure you want to delete this badge from the metric?")
         $http.delete("/metric_badges/#{metricBadge.id}").success(
-          (data,status)->
-            self.availableBadges[metricBadge.badge.id] = angular.copy(self.$scope.courseBadges[metricBadge.badge.id])
-            delete self.badges[metricBadge.badge.id]
-        )
-        .error((err)->
+          (data,status)=>
+            @availableBadges[metricBadge.badge.id] = angular.copy(@$scope.courseBadges[metricBadge.badge.id])
+            delete @badges[metricBadge.badge.id]
+        ).error((err)->
           alert("delete failed!")
         )
 
     badgeIds: ()->
       # distill ids for all badges
-      self = this
       badgeIds = []
-      angular.forEach(self.badges, (badge, index)->
+      angular.forEach(@badges, (badge, index)->
         badgeIds.push(badge.id)
       )
       badgeIds

      #   )

    addTiers: (tiers)->
      self = this
      angular.forEach(tiers, (tier,index)->
        self.addTier(tier)
      )
    resourceUrl: ()->
      "/metrics/#{self.id}"
    order: ()->
      self = this
      jQuery.inArray(this, self.$scope.metrics)

    loadMetricBadge: (metricBadge)->
      self = this
      courseBadge = self.availableBadges[metricBadge.badge_id]
      loadedBadge = new MetricBadgePrototype(self, angular.copy(courseBadge))
      self.badges[courseBadge.id] = loadedBadge # add metric badge to metric
      delete self.availableBadges[courseBadge.id] # remove badge from available badges on metric

    # Badges
    loadMetricBadges: (metricBadges)->
      self = this
      angular.forEach(metricBadges, (metricBadge, index)->
        if (self.availableBadges[metricBadge.badge_id])
          self.loadMetricBadge(metricBadge)
      )

    index: ()->
      @order()
    createRubricGrade: ()->
      self = this
      $http.post("/rubric_grades.json", self.rubricGradeParams()).success(
      )
      .error(
      )
    gradeWithTier: (tier)->
      if @isUsingTier(tier)
        @selectedTier = null

    alert: ()->
      alert("snakes!")    
    addTier: (attrs={})->
      newTier = new TierPrototype(@, attrs, @$scope)
      @tiers.push newTier
      if @rubricGradeTierId and @rubricGradeTierId == newTier.id
        # alert(self.rubricGradeTierId)
        # alert(newTier.id)
        @selectedTier = newTier
    #what is different here? // from GradeRubric
      # addTier: (attrs={})->
      #   self = this
