update variables and structuring