change the datatable if the variate gets changed