Refactored list time sort