update states on actions