simplification of updateState