add a new class state,and complete the related slots