Enabled setting groupBy
Sketched out groupBy function