t.classList.remove('completed');
                }
                
                if (shouldHaveHighPriority && !currentClasses.includes('high-priority')) {
                    element.classList.add('high-priority');
                } else if (!shouldHaveHighPriority && currentClasses.includes('high-priority')) {
                    element.classList.remove('high-priority');
                }
                
                // Update title text
                const titleEl = element.querySelector('.todo