add group.max + unit test
fix semicolons