add group_spec and factory