           q: "select * from json where url=\'#{url}\'"
           format: "json"
       ).success((data, status) ->
-        if data.query.results.json == null
-          $scope.wordFrequency = 0
-        else
-          $scope.wordFrequency = $scope.countFrequency(data.query.results.json.results)
+        $scope.wordFrequency = $scope.countFrequency(data.query.results.json.results)
       ).error (data, status) ->
         console.log "Error #{status}: #{data}"
 

'use strict'

angular.module('appApp.controllers')
  .controller('WordsCtrl', ['$scope', '$http', '$location', ($scope, $http, $location) ->
    $scope.rep = {}
    $scope.reps = []
    $scope.state = "Select a State..."

        $scope.wordFrequency = "?"
      else
        $scope.wordFrequency = "..."
      $timeout.cancel
      $timeout($scope.getWordFrequency(), 2000)
    $scope.$watch "state", ->
      $scope.getRepList()
    

    $scope.getRepWords = ->
      url = "http://capitolwords.org/api/1/phrases.json?entity_type=legislator&entity_value=#{$scope.rep.bioguide_id}&apikey=3cdfa27b289e4d4090fd1b176c45e6cf"
      $http(
        method: "GET"
        url: "http://query.yahooapis.com/v1/public/yql"
