sorted out the sorts without .sort