simplified multiplier code