line 117 changed scope. to $scope.