added scatter-gather helpercode