added a missing paren and added isSortBy