delete activeState and add new