add groups implementation to id.c