working reordering
Merge pull request #40 from bohnje/sort_by

working reordering