inserted function equalProducts