erase state machine