smart sorting (everything)