add scatter and gather