add state resetting