New title sorting logic