Modify new_s_group/1 and state recording