delete repeat
fix compare function