sort list but stack overflow