update compare_products alg