doc state injection