moving variables into attributes