correct groups methods plus tests update doc #240 #165 #166