add group creating function