functions: added functions for working with groups