     isSaved: ()->
       @id != null
     change: ()->
-      self = this
       if @fullCreditTier
         @updateFullCreditTier()
       if @isSaved()
-        self.hasChanges = true
+        @hasChanges = true
     updateFullCreditTier: ()->
       @tiers[0].points = @max_points
     resetChanges: ()->
       @hasChanges = false
     params: ()->
-      self = this
       {
-        name: self.name,
-        max_points: self.max_points,
-        order: self.order(),
-        description: self.description,
-        rubric_id: self.rubricId
+        name: @name,
+        max_points: @max_points,
+        order: @order(),
+        description: @description,
+        rubric_id: @rubricId
       }
     destroy: ()->
 
     remove:(index)->
-      self = this
-      self.$scope.metrics.splice(index,1)
+      @$scope.metrics.splice(index,1)
     create: ()->
-      self = this
       Restangular.all('metrics').post(@params())
-        .then (response)->
+        .then (response)=>
           metric = response.existing_metric
-          self.id = metric.id
-          self.$scope.countSavedMetric()
-          self.addTiers(metric.tiers)
+          @id = metric.id
+          @$scope.countSavedMetric()
+          @addTiers(metric.tiers)
 
     modify: (form)->
       if form.$valid

    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,
        submission_id: submission_id,
        metric_id: metric.id,
        tier_id: tier.id,
        comments: metric.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

    deleteMetricBadge: (badge)->
      self = this
      metricBadge = badge 

      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)->
          alert("delete failed!")
        )

    badgeIds: ()->
      # distill ids for all badges
      self = this
      badgeIds = []
      angular.forEach(self.badges, (badge, index)->
        badgeIds.push(badge.id)
      )
      badgeIds

    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
