add get all groups

I prefer to be a little more explicit with this sort of thing:
```python
if cursor is not None:
    cursor = cursor.encode('rot13')
```
Since we use it twice, maybe make it a little function or something?