Comparison Algorithm updated