The variable **a** is a hash so we can access the value with `a[d]`. With that knowledge, we can refactor this code to:
```
d3.select('#results table tbody')
    .selectAll('tr').sort(function(a, b){ 
      if (order === 'descending') 
        return d3.descending(a[d], b[d]); 
      else 
        return d3.ascending(a[d], b[d]);
    });
```