updated the states