Add done method, add getState method