group commands before sending