doc and state changes