fix grouping initialization
implement validation