change MultiplyNode into Factory class