update state handling