Added implementation for product of factors.