built-in list sort with more efficient compare function working