better initial sorting