add basic groups api

Okay, I see the thinking behind it now.