updating states