improved groups
added some example code for group change