implement broadcast and scan.