updated the current state