update the var to struct