Preliminiary grouping functionality