add sort by function
0.4.0

* add option for `sortBy` to be a sorting function