Added functionality for creating groups