Grouped functionality in macro