Changed sort() to _.sortBy()