Update state functionality