grouping & sorting test extended