added action logic to UpdateState