renamed sync_state to _state