client and server work for updating state