Refactored create-group