Made Compare functional