add reduce and scan.