add function of group and text