updated state management