tweaks: rename a function, and move the sorting there too
2 files changed