add --group configure option, enhance unit tests accordingly