test groups
add group() api method
minor cleanup