modify updateState API